package com.liuc.practice.login.service;

import com.liuc.practice.login.pojo.User;
import com.liuc.practice.login.repo.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author Liu Chang
 * @Date 2021/9/20 12:14 上午
 */
@Service
public class LoginService {

    @Autowired
    private UserRepository repository;

    public boolean checkUser(String name, String password) throws Exception {
        User user = repository.getUser(name, password);
        return user == null ? false : true;
    }

}
